import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'

// https://vitejs.dev/config/
export default defineConfig({
  base: './',
  plugins: [react()],
  resolve: {
    alias: {
      '@': '/src'
    }
  },
  css: {
    preprocessorOptions: {
      less: {
        modifyVars: {
          'primary-color': '#1890ff',
          'link-color': '#1890ff',
          'border-radius-base': '2px'
        },
        javascriptEnabled: true
      }
    }
  },
  server: {
    host: '0.0.0.0',
    open: true,
    proxy: {
      '/api': {
        // target: 'http://139.186.232.136:8088',
        // target: 'http://mml.v5.idcfengye.com',
        target: 'http://localhost:8088',
        changeOrigin: true,
      },
    }
  }
})
